package com.common.enums;


import java.util.Arrays;
import java.util.List;

public enum ChannelEnum {
    OSTMS("1","ostms"),
    SSP("2","meishu666"),
    BAIDU ("3","baidu888"),
    DIANPING("4","dianping222"),
    YISHOU("5","yishou777"),
    MUMEI("6","mumei444")
    ;
    public String code;
    public String message;
    public static final String CHANNEL_OSTMS = "1";
    public static final String CHANNEL_SSP = "2";
    public static final String CHANNEL_BAIDU = "3";
    public static final String CHANNEL_DIANPING="4";
    public static final String CHANNEL_YISHOU="5";
    public static final String CHANNEL_MUMEI="6";

    //添加人脸识别广告的执行步骤，优先级处理
    //优先执行百度步骤
    public static final List<String> EXECUTION_BAIDU_STEP= Arrays.asList(CHANNEL_BAIDU,CHANNEL_DIANPING,CHANNEL_OSTMS);
    //优先执行美数步骤
    public static final List<String> EXECUTION_SSP_STEP= Arrays.asList(CHANNEL_SSP,CHANNEL_BAIDU,CHANNEL_OSTMS);
    //优先执行奥森步骤
    public static final List<String> EXECUTION_OSTMS_STEP= Arrays.asList(CHANNEL_OSTMS);
    //优先执行点屏步骤
    public static final List<String> EXECUTION_DIANPING_STEP= Arrays.asList(CHANNEL_DIANPING,CHANNEL_OSTMS);
    //优先执行易售步骤
    public static final List<String> EXECUTION_YISHOU_STEP= Arrays.asList(CHANNEL_YISHOU,CHANNEL_OSTMS);
    //优先执行钼媒步骤
    public static final List<String> EXECUTION_MUMEI_STEP= Arrays.asList(CHANNEL_MUMEI,CHANNEL_OSTMS);

    //添加广告conCode
    public static final List<String> CHANNEL= Arrays.asList("meishu666","baidu888","dianping222","yishou777","mumei444");
    ChannelEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public static ChannelEnum getChannelType(String value) {
        for (ChannelEnum channelEnum : ChannelEnum.values()) {
            if (value.equals(channelEnum.getCode())) {
                return channelEnum;
            }
        }
        return null;
    }
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
